import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:ytbusiness/config/style.dart';
import 'package:ytbusiness/utils/screen_adaptation.dart';
import 'package:ytbusiness/widgets/widgets.dart';


//支付结果
class PayResult extends StatefulWidget {
  @override
  _PayResultState createState() => _PayResultState();
}

class _PayResultState extends State<PayResult> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white,
      appBar: customAppBar(context,title: "支付订单"),
      body: SingleChildScrollView(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.start,
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            SizedBox(
              height: setWidth(50),
            ),
            Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                Container(
                  width: setWidth(100),
                  height: setWidth(100),
                  child: Image.asset("assets/images/pay_result.png"),
                ),
              ],
            ),
            SizedBox(
              height: setWidth(26),
            ),
            Container(
              child: Text("恭喜您！支付成功",style: TextStyle(color: Color(0xff333333),fontSize: setSp(16)),),
            ),
            SizedBox(
              height: setWidth(32),
            ),
            Container(
              child: RichText(text: TextSpan(
                  children: [
                    TextSpan(
                        text: "￥",style: TextStyle(color: Color(0xff323232),fontSize: setSp(18))
                    ),
                    TextSpan(
                        text: "1259.00",style: TextStyle(color: Color(0xff323232),fontSize: setSp(36),fontWeight: FontWeight.w600)
                    ),
                  ]
              )),
            ),
            SizedBox(
              height: setWidth(36),
            ),
            Container(
              margin: EdgeInsets.only(left: setWidth(31),right: setWidth(31)),
              padding: EdgeInsets.only(top: setWidth(11),bottom: setWidth(11)),
              decoration: BoxDecoration(
                color: YTStyle.mainColor,
                borderRadius: BorderRadius.circular(24)
              ),
              child: Row(
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  Text("完成",style: TextStyle(color: Colors.white,fontSize: setSp(16)),),
                ],
              ),
            ),
            SizedBox(
              height: setWidth(20),
            ),
            Container(
              margin: EdgeInsets.only(left: setWidth(31),right: setWidth(31)),
              padding: EdgeInsets.only(top: setWidth(11),bottom: setWidth(11)),
              decoration: BoxDecoration(
                  borderRadius: BorderRadius.circular(24),
                border: Border.all(color: Color(0xff989898),width: setWidth(0.5))
              ),
              child: Row(
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  Text("查看订单",style: TextStyle(color: Color(0xff989898),fontSize: setSp(16)),),
                ],
              ),
            ),
            
          ],
        ),
      ),
    );
  }
}
